Add SELinux support.
authorKarel Klic <kklic@redhat.com>
Wed, 21 Apr 2010 03:02:58 +0000 (20:02 -0700)
committerGlenn Morris <rgm@gnu.org>
Wed, 21 Apr 2010 03:02:58 +0000 (20:02 -0700)
commit48cfc8e9de615db960ec6cef23853facdabab817
tree320b20cbf36fa940857295185816afd02a096f1c
parentb17459f5dc713a6d821e845a7cfaadf62e561e6b
Add SELinux support.

* configure.in: New option: --with(out)-selinux, on by default.
Set HAVE_LIBSELINUX if we find libselinux, and substitute
LIBSELINUX_LIBS in Makefiles.

* src/Makefile.in (LIBSELINUX_LIBS): New.
(LIBES): Add $LIBSELINUX_LIBS.
* src/eval.c, lisp.h (call7): New function.
* src/fileio.c [HAVE_LIBSELINUX]: Include selinux headers.
(Ffile_selinux_context, Fset_file_selinux_context):
New functions.
(Fcopy_file): New parameter preserve-selinux-context.
(Frename_file): Preserve selinux context when renaming by copy-file.

* lisp/files.el (backup-buffer): Handle SELinux context, and return it
if a backup was made by renaming.
(backup-buffer-copy): Set SELinux context to the target file.
(basic-save-buffer): Set SELinux context of the newly written file.
(basic-save-buffer-1): Now it also returns any SELinux context.
(basic-save-buffer-2): Set SELinux context of the newly created file,
and return it.
* lisp/net/tramp.el (tramp-file-name-for-operation):
Add file-selinux-context.
ChangeLog
configure.in
lisp/ChangeLog
lisp/files.el
lisp/net/tramp.el
src/ChangeLog
src/Makefile.in
src/eval.c
src/fileio.c
src/lisp.h